package pnu.ssm.http;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class Request implements Serializable {
	private boolean optimum = false;
	private int generationCnt = 5000;
	private boolean elitism = true;
	private double uniformRate = 0.5;
	private double mutationRate = 0.5;
	private int tournamentSize = 5;
	private List<Integer> mapSize = new ArrayList<Integer>();
	private int distance = 1;
	private List<Integer> mapContent = new ArrayList<Integer>();
	private List<Request.Transporter> transporters = new LinkedList<Request.Transporter>();
	private List<Request.Block> blocks = new LinkedList<Request.Block>();
	private List<Request.Factory> factories = new LinkedList<Request.Factory>();
	private List<Request.Job> jobs = new LinkedList<Request.Job>();
	
	public Request() {
		// TODO Auto-generated constructor stub
	}

	public boolean isOptimum() {
		return optimum;
	}

	public void setOptimum(boolean optimum) {
		this.optimum = optimum;
	}

	public int getGenerationCnt() {
		return generationCnt;
	}

	public void setGenerationCnt(int generationCnt) {
		this.generationCnt = generationCnt;
	}

	public boolean isElitism() {
		return elitism;
	}

	public void setElitism(boolean elitism) {
		this.elitism = elitism;
	}

	public double getUniformRate() {
		return uniformRate;
	}

	public void setUniformRate(double uniformRate) {
		this.uniformRate = uniformRate;
	}

	public double getMutationRate() {
		return mutationRate;
	}

	public void setMutationRate(double mutationRate) {
		this.mutationRate = mutationRate;
	}

	public int getTournamentSize() {
		return tournamentSize;
	}

	public void setTournamentSize(int tournamentSize) {
		this.tournamentSize = tournamentSize;
	}

	public List<Integer> getMapSize() {
		return mapSize;
	}

	public void setMapSize(List<Integer> mapSize) {
		this.mapSize = mapSize;
	}

	public int getDistance() {
		return distance;
	}

	public void setDistance(int distance) {
		this.distance = distance;
	}

	public List<Integer> getMapContent() {
		return mapContent;
	}

	public void setMapContent(List<Integer> mapContent) {
		this.mapContent = mapContent;
	}

	public List<Request.Transporter> getTransporters() {
		return transporters;
	}

	public void setTransporters(List<Request.Transporter> transporters) {
		this.transporters = transporters;
	}

	public List<Request.Block> getBlocks() {
		return blocks;
	}

	public void setBlocks(List<Request.Block> blocks) {
		this.blocks = blocks;
	}

	public List<Request.Factory> getFactories() {
		return factories;
	}

	public void setFactories(List<Request.Factory> factories) {
		this.factories = factories;
	}

	public List<Request.Job> getJobs() {
		return jobs;
	}

	public void setJobs(List<Request.Job> jobs) {
		this.jobs = jobs;
	}

	static class Transporter implements Serializable {
		private String label = "소나타1";
		private int[] pos = { 5, 2 };
		private int capacity = 5;
		private int speed = 10;
		
		public Transporter() {
			// TODO Auto-generated constructor stub
		}
		
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
		public int[] getPos() {
			return pos;
		}
		public void setPos(int[] pos) {
			this.pos = pos;
		}
		public int getCapacity() {
			return capacity;
		}
		public void setCapacity(int capacity) {
			this.capacity = capacity;
		}
		public int getSpeed() {
			return speed;
		}
		public void setSpeed(int speed) {
			this.speed = speed;
		}
		
	}

	static class Block implements Serializable {
		private String label = "블록1";
		private int[] pos = { 3, 2 };
		private int weight = 12;
		
		public Block() {
			// TODO Auto-generated constructor stub
		}
		
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
		public int[] getPos() {
			return pos;
		}
		public void setPos(int[] pos) {
			this.pos = pos;
		}
		public int getWeight() {
			return weight;
		}
		public void setWeight(int weight) {
			this.weight = weight;
		}
	}

	static class Factory implements Serializable {
		private String label = "공장A";
		private int[] pos = { 4, 5 };
		
		public Factory() {
			// TODO Auto-generated constructor stub
		}
		
		public String getLabel() {
			return label;
		}
		public void setLabel(String label) {
			this.label = label;
		}
		public int[] getPos() {
			return pos;
		}
		public void setPos(int[] pos) {
			this.pos = pos;
		}
	}

	static class Job implements Serializable {
		private int num = 1;
		private String targetFactory = "공장A";
		private String targetBlock = "블록1";
		private String command = "Bring";
		
		public Job() {
			// TODO Auto-generated constructor stub
		}

		public int getNum() {
			return num;
		}

		public void setNum(int num) {
			this.num = num;
		}

		public String getTargetFactory() {
			return targetFactory;
		}

		public void setTargetFactory(String targetFactory) {
			this.targetFactory = targetFactory;
		}

		public String getTargetBlock() {
			return targetBlock;
		}

		public void setTargetBlock(String targetBlock) {
			this.targetBlock = targetBlock;
		}

		public String getCommand() {
			return command;
		}

		public void setCommand(String command) {
			this.command = command;
		}
	}
}
